home *** CD-ROM | disk | FTP | other *** search
Modula Implementation | 1986-04-14 | 1.0 KB | 55 lines | [TEXT/MPS ] |
- IMPLEMENTATION MODULE MultiSkelGlobals;
-
- FROM QuickDraw IMPORT RgnHandle, NewRgn, GetClip, SetClip, DisposeRgn,
- ClipRect, Rect;
- FROM WindowManager IMPORT WindowPtr, DrawGrowIcon;
-
-
- (*
- * Miscellaneous routines.
- * These take care of drawing the frow box and the line along the right
- * edge of the window, and of setting and resetting the clip region to
- * disallow drawing in that right edge by the other drawing routines.
- *)
-
- PROCEDURE DrawGrowBox(wind: WindowPtr);
-
- VAR
- r: Rect;
- oldClip: RgnHandle; (* Different from the global oldClip *)
-
- BEGIN
- r := wind^.portRect;
- r.left := r.right-15;
- oldClip := NewRgn();
- GetClip(oldClip);
- ClipRect(r);
- DrawGrowIcon(wind);
- SetClip(oldClip);
- DisposeRgn(oldClip);
- END DrawGrowBox;
-
-
- PROCEDURE SetWindClip(wind: WindowPtr);
-
- VAR
- r: Rect;
-
- BEGIN
- r := wind^.portRect;
- DEC(r.right, 15);
- oldClip := NewRgn();
- GetClip(oldClip);
- ClipRect(r);
- END SetWindClip;
-
-
- PROCEDURE ResetWindClip;
-
- BEGIN
- SetClip(oldClip);
- DisposeRgn(oldClip);
- END ResetWindClip;
-
- END MultiSkelGlobals.
-